<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<ProjectMadaktariMVC.Models.Patient>" %>
    <div class="innerContent">
    <% using(Html.BeginForm()){%>
            <div class="form_block">
                <span class="form_label">First Name</span>
                <%= Html.TextBox("fName", Model.fName) %>
                <%= Html.ValidationMessage("fNameerr") %>
            </div>
            <div class="form_block">
                <span class="form_label">Last Name</span>
                <%= Html.TextBox("lName", Model.lName) %>
                <%= Html.ValidationMessage("lNameerr") %>
            </div>
            <div class="form_block">
                <span class="form_label">Gender</span>
                <%= Html.RadioButton("gender", "Male", ((Model.gender == null) ? false : Model.gender.Equals("Male"))) %> Male 
                <%= Html.RadioButton("gender", "Female", ((Model.gender == null) ? false : Model.gender.Equals("Female"))) %> Female
                <%= Html.ValidationMessage("gendererr") %>
            </div>
            <div class="form_block">
                <span class="form_label">Date of Birth</span>
                <%= Html.TextBox("dateOfBirth", Model.dateOfBirth == null ? "" : ((DateTime)Model.dateOfBirth).ToString("M/dd/yyyy"), new { @class = "datefield" })%>
                <%= Html.ValidationMessage("dateOfBirtherr") %>
            </div>
            <div class="form_block">
                <span class="form_label">Record Number</span>
                <%= Html.TextBox("recordNumber", Model.recordNumber) %>
                <%= Html.ValidationMessage("recordNumbererr") %>
            </div>
            <div class="form_block">
                <span class="form_label">Cell Phone</span>
                <%= Html.TextBox("cellNumber") %>
                <%= Html.ValidationMessage("cellNumbererr")%>
            </div >
            <div class="form_block">
                <span class="form_label">Tribe 1</span>
                <%= Html.TextBox("tribe1") %>
            </div>
            <div class="form_block">
                <span class="form_label">Tribe 2</span>
                <%= Html.TextBox("tribe2") %>
            </div>
            <span />
            <input type="submit"  value="Submit" /> <% if (Model.patientID != 0)
                                                       { %> <%= Html.ActionLink("Cancel", "View", new { id = Model.patientID })%> <%} %>
    <% } %>
    
    </div>
    
    <script type="text/javascript">
        $(function() {
            $('.datefield').datepicker({ changeYear: true, changeMonth: true, maxDate: '+0D', yearRange: '-120:+1' });
        });
        
    </script>


